<template>
	<el-card id="kkk">
  <div>
    <table id="lll" style="width: 100%;"  border="1">
        <thead>
          <tr>
            <th>学号</th>
            <th>姓名</th>
            <th v-for="item in kcs">{{item.name}}</th>
            <th>总分</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="item in grades">
            <td v-for="r in item" >{{r}}</td>
          </tr>
        </tbody>
    </table>
  </div>
  </el-card>
</template>

<script>
  export default{
    data(){
      return{



        grades:[],
        kcs:[]
      }
    },
    methods:{
      sss(){
         this.$ajax.post('grade/grbjcjcxcjb',{}).then(res=>{
          var result=res.data;
        this.grades=result;
        console.log(this.grades);

         })


      },
      ggg(){
          this.$ajax.post('grade/grbjcjcxcourse',{}).then(res=>{
        var result=res.data;

          this.kcs=result,
         console.log(this.kcs);

          })
      }
    },
    created() {
      this.sss();
      this.ggg()
    }
  }
</script>

<style>
	#lll{
		border:1px #000000 solid;
		border-collapse:collapse; 
		width: 100%;
		height: 12.5rem;
		text-align: center;
		background-color: #3f5c6d2c;
		color: #000000#ffffff;
		background-size: 100% auto;
	}
	#kkk{
		min-height: 99%;
	}
</style>
